package com.huashizhaoxi.lionapp.service.Impl;

import com.huashizhaoxi.lionapp.dao.BannerMapper;
import com.huashizhaoxi.lionapp.entity.Banner;
import com.huashizhaoxi.lionapp.service.BannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class BannerServiceImpl implements BannerService {

    @Autowired
    private BannerMapper bannerMapper;

    @Override
    public List<Banner> getAllBanner() {
        return bannerMapper.getAllBanner();
    }

    @Override
    @Transactional
    public void deleteAllBanner() {
        bannerMapper.deleteAllBanner();
    }

    @Override
    public void insertBanner(List<Banner> bannerList) {
        bannerMapper.insertBanner(bannerList);
    }

}
